From cf01e4ff3b92f5adc21d29af644bbebc2936e846 Mon Sep 17 00:00:00 2001 From: "dan@guaranine.beaverton.ibm.com" Date: Wed, 16 Nov 2005 20:33:12 +0100 Subject: [PATCH] Test for creating a domain with too little memory. --- .../tests/create/15_create_smallmem_pos.py | 27 +++++++++++++++++++ tools/xm-test/tests/create/Makefile.am | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 tools/xm-test/tests/create/15_create_smallmem_pos.py diff --git a/tools/xm-test/tests/create/15_create_smallmem_pos.py b/tools/xm-test/tests/create/15_create_smallmem_pos.py new file mode 100644 index 0000000000..516c43ad4e --- /dev/null +++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py @@ -0,0 +1,27 @@ +#!/usr/bin/python + +# Copyright (C) International Business Machines Corp., 2005 +# Author: Dan Smith + +from XmTestLib import * + +MEM = 16 + +domain = XmTestDomain(extraOpts={"memory":"%i" % MEM}) + +try: + domain.start() +except DomainError, e: + FAIL("Unable to start a domain with %i MB" % MEM) + +try: + console = XmConsole(domain.getName()) + console.sendInput("input") + console.runCmd("ls") +except ConsoleError, e: + if e.reason == RUNAWAY: + FAIL("Bug #380: Starting a console with %i MB crashed the console daemon" % MEM) + else: + FAIL("Starting a console with %i MB failed: domain dies immediately!" % MEM) + +domain.destroy() diff --git a/tools/xm-test/tests/create/Makefile.am b/tools/xm-test/tests/create/Makefile.am index 0d42752e78..33eff51d38 100644 --- a/tools/xm-test/tests/create/Makefile.am +++ b/tools/xm-test/tests/create/Makefile.am @@ -12,8 +12,8 @@ TESTS = 01_create_basic_pos.test \ 11_create_concurrent_pos.test \ 12_create_concurrent_stress_pos.test \ 13_create_multinic_pos.test \ - 14_create_blockroot_pos.test - + 14_create_blockroot_pos.test \ + 15_create_smallmem_pos.test DISABLED_TESTS = 05_create_noroot_noram_neg.test -- 2.30.2